package cn.jhg.account.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.jhg.account.service.UserSvc;
import cn.jhg.account.util.JsonUtil;
import cn.jhg.account.service.EMSvc;

import cn.jhg.account.entity.Equipment;

import cn.jhg.account.util.ServiceResult;
import java.util.List;

@Component
public class EMRestImpl implements EMRest {
	@Resource
	private EMSvc emSvc;
	
	@Override
	public String findEMs(String name) {
		ServiceResult<List<Equipment>> result = emSvc.findEMs(name);
		
		return JsonUtil.packaging(result);
	}

}
